import request from '@/config/axios'

export interface LoadSiteMgrVO {
  id: number
  siteName: string
  siteType: number
  customerName: string
  customerId: number
}

// 查询装卸货地管理列表
export const getLoadSiteMgrPage = async (params) => {
  return await request.get({ url: `/queue/load-site-mgr/page`, params })
}
// 查询装货地列表
export const getLoadSitePage = async (id) => {
  if(!!id)  return await request.get({ url: `/queue/load-site-mgr/get-simple-list-no-auth?id=${id}`})
  else  return await request.get({ url: `/queue/load-site-mgr/get-simple-list-no-auth`})
}

// 查询装卸货地管理详情
export const getLoadSiteMgr = async (id: number) => {
  return await request.get({ url: `/queue/load-site-mgr/get?id=` + id })
}

// 新增装卸货地管理
export const createLoadSiteMgr = async (data) => {
  return await request.post({ url: `/queue/load-site-mgr/create`, data })
}

// 修改装卸货地管理
export const updateLoadSiteMgr = async (data) => {
  return await request.put({ url: `/queue/load-site-mgr/update`, data })
}

// 删除装卸货地管理
export const deleteLoadSiteMgr = async (id: number) => {
  return await request.delete({ url: `/queue/load-site-mgr/delete?id=` + id })
}

// 导出装卸货地管理 Excel
export const exportLoadSiteMgr = async (params) => {
  return await request.download({ url: `/queue/load-site-mgr/export-excel`, params })
}
